<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Spider extends Model
{
    use HasFactory;
    public function jd_books()
    {
        return $this->hasMany(JDBook::class, 'job');
    }
    public function dd_books()
    {
        return $this->hasMany(DDBook::class, 'job');
    }
    public function book(){
        return $this->hasOne(Book::class, 'isbn', 'key');
    }
}
